﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/PublicaTuPropiedad/PublicaTuPropiedadWeb.Master" Inherits="System.Web.Mvc.ViewPage<BLL.DTO.HelperDTO.RegisterDTO>" %>
<%@ Import Namespace="Web.Helper" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Titulo" runat="server">
    <h2><%: Resources.Presentation.Register.viewTitle %></h2>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Contenido" runat="server">
    <div id="transparencia">
        <br />
        <%using (Html.BeginForm("NaturalPeopleRegister_submit", "PublicaTuPropiedad", FormMethod.Post, new { id = "frmNaturalPeopleRegister" }))
          { %>
          <%: Html.ValidationSummary(true) %>
        <table class="gridRegistro">
            <tr class="gridAlternateRowRegistro">
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.rut_Persona)%></th>
                <td style="width:20%;"><%: Html.TextBoxFor(reg => reg.rut_Persona, new { maxlength = "10", autocomplete = "off", onkeypress = "onlyRut();", onblur = "formatRut(id, value);" })%></td>
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.nombres_Persona)%></th>
                <td style="width:20%;"><%: Html.TextBoxFor(reg => reg.nombres_Persona, new { maxlength = "50", autocomplete = "off", onkeypress = "return onlyText(event);", onkeydown = "disableCtrolC();" })%></td>
            </tr>
            <tr class="gridNoAlternateRowRegistro">
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.rut_Persona)%></td>
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.nombres_Persona)%></td>
            </tr>
            <tr class="gridAlternateRowRegistro">
                <th class="thRegistro" style="width:20%"><%: Html.LabelFor(reg => reg.apellidoPaterno_Persona)%></th>
                <td style="width:20%;"><%: Html.TextBoxFor(reg => reg.apellidoPaterno_Persona, new { maxlength = "30", autocomplete = "off", onkeypress = "return onlyText(event);", onkeydown = "disableCtrolC();" })%></td>
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.apellidoMaterno_Persona)%></th>
                <td style="width:20%;"><%: Html.TextBoxFor(reg => reg.apellidoMaterno_Persona, new { maxlength = "30", autocomplete = "off", onkeypress = "return onlyText(event);", onkeydown = "disableCtrolC();" })%></td>
            </tr>
            <tr class="gridNoAlternateRowRegistro">
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.apellidoPaterno_Persona)%></td>
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.apellidoMaterno_Persona)%></td>
            </tr>
            <tr class="gridAlternateRowRegistro">
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.telefono_Persona)%></th>
                <td style="width:20%;"><%: Html.TextBoxFor(reg => reg.telefono_Persona, new { maxlength = "8", autocomplete = "off", onkeypress = "onlyNumbers();", onkeydown = "disableCtrolC();" })%></td>
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.celular_Persona)%></th>
                <td style="width:20%;"><%: Html.TextBoxFor(reg => reg.celular_Persona, new { maxlength = "8", autocomplete = "off", onkeypress = "onlyNumbers();", onkeydown = "disableCtrolC();" })%></td>
            </tr>
            <tr class="gridNoAlternateRowRegistro">
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.telefono_Persona)%></td>
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.celular_Persona)%></td>
            </tr>
            <tr class="gridAlternateRowRegistro">
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.correo_Persona)%></th>
                <td style="width:20%;" colspan="3"><%: Html.TextBoxFor(reg => reg.correo_Persona, new { maxlength = "60", autocomplete = "off", style = "width:400px;" })%></td>
            </tr>
            <tr class="gridNoAlternateRowRegistro">
                <td colspan="4" style="width:80%;"><%: Html.ValidationMessageFor(reg => reg.correo_Persona)%></td>
            </tr>
            <tr class="gridAlternateRowRegistro">
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.fechaNacimiento_Persona)%></th>
                <td style="width:20%;"><%: Html.TextBoxFor(reg => reg.fechaNacimiento_Persona)%></td>
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.codigoGenero_Genero)%></th>
                <td style="width:20%;"><%: Html.DropDownListFor(reg => reg.codigoGenero_Genero, (SelectList)ViewBag.Genero, Resources.Presentation.Register.dropDownListSelectGender, new { style = "width:155px;" })%></td>
            </tr>
            <tr class="gridNoAlternateRowRegistro">
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.fechaNacimiento_Persona)%></td>
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.codigoGenero_Genero)%></td>
            </tr>
            <tr class="gridAlternateRowRegistro">
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.codigoRegion_Region)%></th>
                <td style="width:20%;"><%: Html.DropDownListFor(reg => reg.codigoRegion_Region, (SelectList)ViewBag.Region, Resources.Presentation.Register.dropDownListSelectRegion, new { style = "width:155px;", onchange = "filtroCiudad();" })%></td>
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.codigoCiudad_Ciudad)%></th>
                <td style="width:20%;"><select id="codigoCiudad_Ciudad" name="codigoCiudad_Ciudad" style="width:155px;" onchange="filtroComuna();"></select></td>
            </tr>
            <tr class="gridNoAlternateRowRegistro">
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.codigoRegion_Region)%></td>
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.codigoCiudad_Ciudad)%></td>
            </tr>
            <tr class="gridAlternateRowRegistro">
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.codigoComuna_Comuna)%></th>
                <td style="width:20%;"><select id="codigoComuna_Comuna" name="codigoComuna_Comuna" style="width:155px;"></select></td>
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.password_Usuario)%></th>
                <td style="width:20%;"><%: Html.PasswordFor(reg => reg.password_Usuario, new { maxlength = "12" })%></td>
            </tr>
            <tr class="gridNoAlternateRowRegistro">
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.codigoComuna_Comuna)%></td>
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.password_Usuario)%></td>
            </tr>
            <tr class="gridAlternateRowRegistro">
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.codigoPregunta_PreguntaSecreta)%></th>
                <td style="width:20%;"><%: Html.DropDownListFor(reg => reg.codigoPregunta_PreguntaSecreta, (SelectList)ViewBag.PreguntasSecretas, Resources.Presentation.Register.dropDownListSelectQuestion, new { style = "width:155px;", onchange = "enabledAnswer();" })%></td>
                <th class="thRegistro" style="width:20%;"><%: Html.LabelFor(reg => reg.respuesta_Usuario)%></th>
                <td style="width:20%;"><%: Html.TextBoxFor(reg => reg.respuesta_Usuario, new { maxlength = "15", autocomplete = "off" })%></td>
            </tr>
            <tr class="gridNoAlternateRowRegistro">
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.codigoPregunta_PreguntaSecreta)%></td>
                <td colspan="2" style="width:40%;"><%: Html.ValidationMessageFor(reg => reg.respuesta_Usuario)%></td>
            </tr>
            <tr class="gridButtonsRegistro">
                <td colspan="2" style="width:40%;"><%: Html.Button("btnSaveRegister", Resources.Presentation.Register.btnSaveRegister, iconClass: IconType.Save)%></td>
                <td colspan="2" style="width:40%;"><%: Html.Button("btnCancelRegister", Resources.Presentation.Register.btnCancelRegister, iconClass: IconType.Cancel, htmlAttributes: new { onclick = "HomeClick();" })%></td>
            </tr>
        </table>
        <%} %>
    </div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsSection" runat="server">
    <%: Scripts.Render("~/bundles/jqueryval") %>
    <script src="<%: Url.Content("~/Content/Scripts/PublicaTuPropiedad/NaturalPeopleRegister/jsNaturalPeopleRegister.js")%>" type="text/javascript"></script>
    <script type="text/javascript">
        var urlFilterCityByRegion = '<%:Url.Action("GetAllCityByRegion", "PublicaTuPropiedad") %>';
        var urlFilterComunaByCiudad = '<%:Url.Action("GetAllComunaByCity", "PublicaTuPropiedad") %>';
    </script>
</asp:Content>
